/**
 * 
 */
package com.sesame.daoimpl;

import java.util.List;

import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;

import com.sesame.dao.GroupTagDAO;
import com.sesame.domain.GroupTag;

/**
 * @author shubeta
 *
 */
public class GroupTagDAOImpl extends SqlMapClientDaoSupport implements GroupTagDAO {

    public void addGroupTag(GroupTag grouptag) {
        getSqlMapClientTemplate().insert("addGroupTag", grouptag);
    }

    public void deleteGroupTagById(Integer id) {
        getSqlMapClientTemplate().delete("deleteGroupTagById", id);
    }
    
    @SuppressWarnings("unchecked")
    public List<GroupTag> getAllGroupTag() {
        return (List<GroupTag>) getSqlMapClientTemplate().queryForList("getAllGroupTag");
    }

    public GroupTag getGroupTagById(Integer id) {
        return (GroupTag) getSqlMapClientTemplate().queryForObject("getGroupTagById", id);
    }

    public void updateGroupTag(GroupTag grouptag) {
        getSqlMapClientTemplate().update("updateGroupTag", grouptag);
    }
}
